import request from '../request/index'

/**
 * 获取信息
 * @param data
 * @returns {AxiosPromise}
 */
export function getInfos () {
    return request({
        url: '/vote/1',
        method: 'get'
    })
}
export function getSign (data) {
    return request({
        url: '/get-sign',
        method: 'post',
        data: data
    })
}
export function login (code) {
    return request({
        url: '/login?code=' + code,
        method: 'get'
    })
}
export function vote (unionid, id) {
    return request({
        url: '/vote?unionid=' + unionid + '&id=' + id,
        method: 'get'
    })
}

export function apply (data) {
    return request({
        url: '/apply',
        method: 'post',
        data: data
    })
}
